package cn.feuler.user8080.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "code-8081", fallback = CodeClientFallback.class, path = "/code")
public interface CodeClient {
    @GetMapping("create/{email}")
    public boolean create(@PathVariable("email") String email);

    @GetMapping("validate/{email}/{code}")
    public Integer validate(@PathVariable("email") String email, @PathVariable("code") String code);
}
